Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor: use starknet.js v5 #100

Merged
merged 3 commits into from
Jul 17, 2023
Merged

refactor: use starknet.js v5 #100

merged 3 commits into from
Jul 17, 2023

Conversation

irisdv
Copy link
Collaborator

@irisdv irisdv commented Jul 17, 2023

This PR closes #98

  • Update to use starknet.js v5
  • Removed unused api endpoints that depended on starknet.js

@vercel
Copy link

vercel bot commented Jul 17, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
goerli-starknet-quest ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jul 17, 2023 10:05am
starknet-quest ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jul 17, 2023 10:05am

Copy link
Member

@Th0rgal Th0rgal left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please refactor the chainId conditional code

setIsWrongNetwork(false);
}
}, [library, network, isConnected]);
provider.getChainId().then((chainId) => {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think:

  const isWrongNetwork =
    (chainId === constants.StarknetChainId.SN_GOERLI && network === "mainnet") ||
    (chainId === constants.StarknetChainId.SN_MAIN && network === "testnet");

  setIsWrongNetwork(isWrongNetwork);

does the same thing and is a bit more explicit

@Th0rgal Th0rgal self-requested a review July 17, 2023 10:00
Copy link
Member

@Th0rgal Th0rgal left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Change starknet js v5 to this app
2 participants